<template>
  <view class="leave-container">
		<view class="navBox">
			<image class="avatar" src="/src/static/images/mine_bg.png"></image>
			<view class="listContent">
				<view class="userName">张三</view>
				<view class="userInfo">
					<view class="infoText">
						<view class="text">九龙坡人民法院</view>
						<text>法官</text>
					</view>
					<view class="infoText">
						<view class="text">(2024)渝1017民初3636号</view>
						<text>待开庭</text>
					</view>
				</view>
			</view>
		</view>
		<view class="dialogBox">
			<view class="dialogLi">
				<view class="time">凌晨12:27</view>
				<view class="message">
					<image class="avatar" src="/src/static/images/icon-pass.png"></image>
					<view class="messageContent">您好，请问有什么事情吗？</view>
				</view>
				<view class="message">
					<image class="avatar" src="/src/static/images/icon-pass.png"></image>
					<view class="messageContent">您好！请问有什么事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情事情</view>
				</view>
			</view>
			<view class="dialogLi right">
				<view class="time">凌晨12:27</view>
				<view class="message">
					<image class="avatar" src="/src/static/images/icon-pass.png"></image>
					<view class="messageContent">您好，请问有什么事情吗？</view>
				</view>
			</view>
		</view>
		<view class="pageFooter">
			<view class="write">
				<input class="input" type="text" placeholder="仅能发送一条消息，请尽量阐述清晰" />
				<view class="btnSend">发送</view>
			</view>
			<view class="footer"></view>
		</view>
	</view>
</template>

<script setup lang="ts">
import { ref } from "vue";

</script>

<style lang="scss" scoped>
.leave-container {
	.navBox{
		padding: 20rpx 30rpx;
		background-color: #fff;
		position: fixed;
		top: calc(0px + env(safe-area-inset-top));
		left: 0;
		z-index: 100;
		width: calc(100% - 60rpx);
		display: flex;
		.avatar{
			width: 180rpx;
			height: 180rpx;
			border-radius: 16rpx;
			flex-shrink: 0;
			overflow: hidden;
		}
		.listContent{
			width: calc(100% - 210rpx);
			padding: 16rpx 0;
			padding-left: 30rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			.userName{
				font-size: 32rpx;
				color: #222222;
			}
			.userInfo{
				.infoText{
					font-weight: 400;
					font-size: 24rpx;
					color: #666666;
					margin-top: 5rpx;
					display: flex;
					align-items: center;
					.text{
						max-width: calc(100% - 70rpx);
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
					}
					text{
						margin: 0 10rpx;
						flex-shrink: 0;
					}
				}
			}
		}
	}
	.dialogBox{
		padding: 0 30rpx;
		padding-top: 220rpx;
		width: calc(100% - 60rpx);
		.dialogLi{
			display: flex;
			flex-direction: column;
			width: 100%;
			.time{
				height: 40rpx;
				background: rgba(0,0,0,0.2);
				border-radius: 8rpx;
				font-size: 24rpx;
				color: #FFFFFF;
				line-height: 40rpx;
				padding: 0 10rpx;
				margin: 0 auto;
				margin-top: 20rpx;
			}
			.message{
				margin-top: 30rpx;
				display: flex;
				width: 100%;
				.avatar{
					width: 80rpx;
					height: 80rpx;
					border-radius: 50%;
					overflow: hidden;
					flex-shrink: 0;
				}
				.messageContent{
					max-width: calc(100% - 190rpx);
					margin: 0 20rpx;
					padding: 20rpx 30rpx;
					background: #FFFFFF;
					border-radius: 0rpx 16rpx 16rpx 16rpx;
					font-weight: 400;
					font-size: 32rpx;
					color: #333333;
					line-height: 46rpx;
				}
			}
		}
		.right{
			.message{
				justify-content: flex-end;
				.avatar{
					order: 2;
				}
				.messageContent{
					order: 1;
					color: #FFFFFF;
					background: #1E92F0;
					border-radius: 16rpx 0rpx 16rpx 16rpx;
				}
			}
		}
	}
	.pageFooter{
		position: fixed;
		width: 100%;
		bottom: 0;
		left: 0;
		z-index: 100;
	}
	.write{
		width: calc(100% - 120rpx);
		padding: 28rpx 30rpx;
		margin: 0 auto;
		margin-bottom: 88rpx;
		background: rgba(255,255,255,0.6);
		border-radius: 16rpx;
		box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.05);
		display: flex;
		align-items: center;
		justify-content: space-between;
		.input{
			width: calc(100% - 160rpx);
			font-size: 28rpx;
		}
		.input::placeholder{
			font-weight: 400;
			font-size: 28rpx;
			color: #666666;
		}
		.btnSend{
			width: 126rpx;
			height: 48rpx;
			background: #1E92F0;
			text-align: center;
			line-height: 48rpx;
			font-weight: normal;
			font-size: 24rpx;
			color: #FFFFFF;
			border-radius: 90rpx;
		}
	}
	.footer{
		position: absolute;
		width: 100%;
		height: 68rpx;
		bottom: 0;
		background-color: #fff;
	}
}
</style>
